package com.JL.engine.components;

import java.awt.*;
import com.JL.engine.model.Component;

public class DimensionComponent extends Component {
    private final Dimension dimension =new Dimension();

    public int getWidth() {
        return dimension.width;
    }
    public int getHeight(){
        return dimension.height;
    }
    public void setWidth(int width){
        dimension.width = width;
    }
    public void setHeight(int height){
        dimension.height = height;
    }
    public void setSize(int width,int height){
        dimension.width =width;
        dimension.height =height;
    }
    public void setSize(Dimension dimension){
        this.setSize(dimension.width,dimension.height);
    }

    public Dimension getDimension(){
        return new Dimension(this.dimension);
    }
}